<?php
//ini_set('error_reporting',0);
//设置时区

date_default_timezone_set('Asia/Chongqing');
define('ROOT_PATH', dirname(__FILE__));
define('APPLICATION_DIRECTORY', ROOT_PATH . '/officialweb');
//ini_set('serialize_precision', -1);

//注册smarty的自动加载
function __smartyAutoload($strClassName){
    $_class = strtolower($strClassName);
    if (substr($_class, 0, 16) === 'smarty_internal_' || $_class == 'smarty_security') {
        return include SMARTY_SYSPLUGINS_DIR . $_class . '.php';
    }
}
spl_autoload_register('__smartyAutoload');

require_once ROOT_PATH . '/../library/bootstrap.php';
//创建application
$host = $_SERVER['HTTP_HOST'];


$application = new Yaf_Application(ROOT_PATH . "/conf/officialweb.ini");
$application->bootstrap()->run();